﻿@using LdCms.EF.DbModels
@using LdCms.Common.Utility
@using LdCms.Common.Extension
@model Ld_Log_TableOperation
@{
    ViewData["Title"] = "Show";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<article class="page-container">
    <div>
        <div style="height:32px;line-height:32px;">基本信息：</div>
        <table class="table table-border table-bordered table-hover table-bg table-sort">
            <tbody>
                <tr>
                    <td class="text-r" style="background-color:#f5fafe;" width="200">数据库表名：</td>
                    <td class="text-l" width="" colspan="3">@Model.TableName</td>
                </tr>
                <tr>
                    <td class="text-r" style="background-color:#f5fafe;" width="200">客户端：</td>
                    <td class="text-l" width="35%">@Model.ClientName</td>
                    <td class="text-r" style="background-color:#f5fafe;" width="200">类别：</td>
                    <td class="text-l" width="">@Model.ClassName</td>
                </tr>
                <tr>
                    <td class="text-r" style="background-color:#f5fafe;" width="200">帐号：</td>
                    <td class="text-l" width="">@Model.Account</td>
                    <td class="text-r" style="background-color:#f5fafe;" width="200">昵称：</td>
                    <td class="text-l" width="">@Model.NickName</td>
                </tr>
                <tr>
                    <td class="text-r" style="background-color:#f5fafe;" width="200">备注：</td>
                    <td class="text-l" width="" colspan="3">@Model.Remark</td>
                </tr>
            </tbody>
        </table>
    </div>
    <div>
        <div class="l" style="width:45%;">
            <div style="height:32px;line-height:32px;">原数据：</div>
            <table class="table table-border table-bordered table-hover table-bg table-sort">
                <thead>
                    <tr class="text-c">
                        <th width="180">字段名称</th>
                        <th width="">字段值</th>
                    </tr>
                </thead>
                <tbody id="lists">
                    @{
                        string strOldContent = Model.OldContent;
                        if (!string.IsNullOrEmpty(strOldContent))
                        {
                            var SDContent = Utility.JsonToSortedDictionary(strOldContent);
                            foreach (KeyValuePair<string, string> temp in SDContent)
                            {
                                <tr class="text-c">
                                    <td>@temp.Key.Trim()</td>
                                    <td class="text-l">@temp.Value.Trim()</td>
                                </tr>
                            }
                        }
                    }
                </tbody>
            </table>
        </div>
        <div class="l" style="width:10%;">
            <p style="width:100%; height:20px;"></p>
        </div>
        <div class="l" style="width:45%;border:0px solid #ffd800;">
            <div style="height:32px;line-height:32px;">新数据：</div>
            <table class="table table-border table-bordered table-hover table-bg table-sort">
                <thead>
                    <tr class="text-c">
                        <th width="220">字段名称</th>
                        <th width="">字段值</th>
                    </tr>
                </thead>
                <tbody id="lists">
                    @{
                        string strNewContent = Model.NewContent;
                        if (!string.IsNullOrEmpty(strNewContent))
                        {
                            var SDContent = Utility.JsonToSortedDictionary(strNewContent);
                            foreach (KeyValuePair<string, string> temp in SDContent)
                            {
                                <tr class="text-c">
                                    <td>@temp.Key.Trim()</td>
                                    <td class="text-l">@temp.Value.Trim()</td>
                                </tr>
                            }
                        }
                        else
                        {
                            var SDContent = Utility.JsonToSortedDictionary(strOldContent);
                            foreach (KeyValuePair<string, string> temp in SDContent)
                            {
                                <tr class="text-c">
                                    <td>@temp.Key.Trim()</td>
                                    <td class="text-l"></td>
                                </tr>
                            }
                        }
                    }
                </tbody>
            </table>
        </div>
        <div class="clear"></div>
    </div>
    <div class="pt-30" style="width:100%; height:60px;"></div>
</article>





